//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2024 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
@_exported import SotoCore

/// Service object for interacting with AWS KinesisVideo service.
public struct KinesisVideo: AWSService {
    // MARK: Member variables

    /// Client used for communication with AWS
    public let client: AWSClient
    /// Service configuration
    public let config: AWSServiceConfig

    // MARK: Initialization

    /// Initialize the KinesisVideo client
    /// - parameters:
    ///     - client: AWSClient used to process requests
    ///     - region: Region of server you want to communicate with. This will override the partition parameter.
    ///     - partition: AWS partition where service resides, standard (.aws), china (.awscn), government (.awsusgov).
    ///     - endpoint: Custom endpoint URL to use instead of standard AWS servers
    ///     - middleware: Middleware chain used to edit requests before they are sent and responses before they are decoded 
    ///     - timeout: Timeout value for HTTP requests
    ///     - byteBufferAllocator: Allocator for ByteBuffers
    ///     - options: Service options
    public init(
        client: AWSClient,
        region: SotoCore.Region? = nil,
        partition: AWSPartition = .aws,
        endpoint: String? = nil,
        middleware: AWSMiddlewareProtocol? = nil,
        timeout: TimeAmount? = nil,
        byteBufferAllocator: ByteBufferAllocator = ByteBufferAllocator(),
        options: AWSServiceConfig.Options = []
    ) {
        self.client = client
        self.config = AWSServiceConfig(
            region: region,
            partition: region?.partition ?? partition,
            serviceName: "KinesisVideo",
            serviceIdentifier: "kinesisvideo",
            serviceProtocol: .restjson,
            apiVersion: "2017-09-30",
            endpoint: endpoint,
            serviceEndpoints: Self.serviceEndpoints,
            variantEndpoints: Self.variantEndpoints,
            errorType: KinesisVideoErrorType.self,
            xmlNamespace: "https://kinesisvideo.amazonaws.com/doc/2017-09-30/",
            middleware: middleware,
            timeout: timeout,
            byteBufferAllocator: byteBufferAllocator,
            options: options
        )
    }


    /// custom endpoints for regions
    static var serviceEndpoints: [String: String] {[
        "us-gov-east-1": "kinesisvideo-fips.us-gov-east-1.amazonaws.com",
        "us-gov-west-1": "kinesisvideo-fips.us-gov-west-1.amazonaws.com"
    ]}


    /// FIPS and dualstack endpoints
    static var variantEndpoints: [EndpointVariantType: AWSServiceConfig.EndpointVariant] {[
        [.fips]: .init(endpoints: [
            "us-gov-east-1": "kinesisvideo-fips.us-gov-east-1.amazonaws.com",
            "us-gov-west-1": "kinesisvideo-fips.us-gov-west-1.amazonaws.com"
        ])
    ]}

    // MARK: API Calls

    /// Creates a signaling channel.   CreateSignalingChannel is an asynchronous operation.
    @Sendable
    @inlinable
    public func createSignalingChannel(_ input: CreateSignalingChannelInput, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateSignalingChannelOutput {
        try await self.client.execute(
            operation: "CreateSignalingChannel", 
            path: "/createSignalingChannel", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates a signaling channel.   CreateSignalingChannel is an asynchronous operation.
    ///
    /// Parameters:
    ///   - channelName: A name for the signaling channel that you are creating. It must be unique for each Amazon Web Services account and Amazon Web Services Region.
    ///   - channelType: A type of the signaling channel that you are creating. Currently, SINGLE_MASTER is the only supported channel type.
    ///   - singleMasterConfiguration: A structure containing the configuration for the SINGLE_MASTER channel type.
    ///   - tags: A set of tags (key-value pairs) that you want to associate with this channel.
    ///   - logger: Logger use during operation
    @inlinable
    public func createSignalingChannel(
        channelName: String,
        channelType: ChannelType? = nil,
        singleMasterConfiguration: SingleMasterConfiguration? = nil,
        tags: [Tag]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateSignalingChannelOutput {
        let input = CreateSignalingChannelInput(
            channelName: channelName, 
            channelType: channelType, 
            singleMasterConfiguration: singleMasterConfiguration, 
            tags: tags
        )
        return try await self.createSignalingChannel(input, logger: logger)
    }

    /// Creates a new Kinesis video stream.  When you create a new stream, Kinesis Video Streams assigns it a version number. When you change the stream's metadata, Kinesis Video Streams updates the version.   CreateStream is an asynchronous operation. For information about how the service works, see How it Works.  You must have permissions for the KinesisVideo:CreateStream action.
    @Sendable
    @inlinable
    public func createStream(_ input: CreateStreamInput, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateStreamOutput {
        try await self.client.execute(
            operation: "CreateStream", 
            path: "/createStream", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates a new Kinesis video stream.  When you create a new stream, Kinesis Video Streams assigns it a version number. When you change the stream's metadata, Kinesis Video Streams updates the version.   CreateStream is an asynchronous operation. For information about how the service works, see How it Works.  You must have permissions for the KinesisVideo:CreateStream action.
    ///
    /// Parameters:
    ///   - dataRetentionInHours: The number of hours that you want to retain the data in the stream. Kinesis Video Streams retains the data in a data store that is associated with the stream. The default value is 0, indicating that the stream does not persist data. When the DataRetentionInHours value is 0, consumers can still consume the fragments that remain in the service host buffer, which has a retention time limit of 5 minutes and a retention memory limit of 200 MB. Fragments are removed from the buffer when either limit is reached.
    ///   - deviceName: The name of the device that is writing to the stream.   In the current implementation, Kinesis Video Streams does not use this name.
    ///   - kmsKeyId: The ID of the Key Management Service (KMS) key that you want Kinesis Video Streams to use to encrypt stream data. If no key ID is specified, the default, Kinesis Video-managed key (Amazon Web Services/kinesisvideo) is used. For more information, see DescribeKey.
    ///   - mediaType: The media type of the stream. Consumers of the stream can use this information when processing the stream. For more information about media types, see Media Types. If you choose to specify the MediaType, see Naming Requirements for guidelines. Example valid values include "video/h264" and "video/h264,audio/aac". This parameter is optional; the default value is null (or empty in JSON).
    ///   - streamName: A name for the stream that you are creating. The stream name is an identifier for the stream, and must be unique for each account and region.
    ///   - tags: A list of tags to associate with the specified stream. Each tag is a key-value pair (the value is optional).
    ///   - logger: Logger use during operation
    @inlinable
    public func createStream(
        dataRetentionInHours: Int? = nil,
        deviceName: String? = nil,
        kmsKeyId: String? = nil,
        mediaType: String? = nil,
        streamName: String,
        tags: [String: String]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateStreamOutput {
        let input = CreateStreamInput(
            dataRetentionInHours: dataRetentionInHours, 
            deviceName: deviceName, 
            kmsKeyId: kmsKeyId, 
            mediaType: mediaType, 
            streamName: streamName, 
            tags: tags
        )
        return try await self.createStream(input, logger: logger)
    }

    /// An asynchronous API that deletes a stream’s existing edge configuration, as well as the corresponding media from the Edge Agent. When you invoke this API, the sync status is set to DELETING. A deletion process starts, in which active edge jobs are stopped and all media is deleted from the edge device. The time to delete varies, depending on the total amount of stored media. If the deletion process fails, the sync status changes to DELETE_FAILED. You will need to re-try the deletion. When the deletion process has completed successfully, the edge configuration is no longer accessible.
    @Sendable
    @inlinable
    public func deleteEdgeConfiguration(_ input: DeleteEdgeConfigurationInput, logger: Logger = AWSClient.loggingDisabled) async throws -> DeleteEdgeConfigurationOutput {
        try await self.client.execute(
            operation: "DeleteEdgeConfiguration", 
            path: "/deleteEdgeConfiguration", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// An asynchronous API that deletes a stream’s existing edge configuration, as well as the corresponding media from the Edge Agent. When you invoke this API, the sync status is set to DELETING. A deletion process starts, in which active edge jobs are stopped and all media is deleted from the edge device. The time to delete varies, depending on the total amount of stored media. If the deletion process fails, the sync status changes to DELETE_FAILED. You will need to re-try the deletion. When the deletion process has completed successfully, the edge configuration is no longer accessible.
    ///
    /// Parameters:
    ///   - streamARN: The Amazon Resource Name (ARN) of the stream. Specify either the StreamName or the StreamARN.
    ///   - streamName: The name of the stream from which to delete the edge configuration. Specify either the StreamName or the StreamARN.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteEdgeConfiguration(
        streamARN: String? = nil,
        streamName: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeleteEdgeConfigurationOutput {
        let input = DeleteEdgeConfigurationInput(
            streamARN: streamARN, 
            streamName: streamName
        )
        return try await self.deleteEdgeConfiguration(input, logger: logger)
    }

    /// Deletes a specified signaling channel. DeleteSignalingChannel is an asynchronous operation. If you don't specify the channel's current version, the most recent version is deleted.
    @Sendable
    @inlinable
    public func deleteSignalingChannel(_ input: DeleteSignalingChannelInput, logger: Logger = AWSClient.loggingDisabled) async throws -> DeleteSignalingChannelOutput {
        try await self.client.execute(
            operation: "DeleteSignalingChannel", 
            path: "/deleteSignalingChannel", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes a specified signaling channel. DeleteSignalingChannel is an asynchronous operation. If you don't specify the channel's current version, the most recent version is deleted.
    ///
    /// Parameters:
    ///   - channelARN: The Amazon Resource Name (ARN) of the signaling channel that you want to delete.
    ///   - currentVersion: The current version of the signaling channel that you want to delete. You can obtain the current version by invoking the DescribeSignalingChannel or ListSignalingChannels API operations.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteSignalingChannel(
        channelARN: String,
        currentVersion: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeleteSignalingChannelOutput {
        let input = DeleteSignalingChannelInput(
            channelARN: channelARN, 
            currentVersion: currentVersion
        )
        return try await self.deleteSignalingChannel(input, logger: logger)
    }

    /// Deletes a Kinesis video stream and the data contained in the stream.  This method marks the stream for deletion, and makes the data in the stream inaccessible immediately.  To ensure that you have the latest version of the stream before deleting it, you can specify the stream version. Kinesis Video Streams assigns a version to each stream. When you update a stream, Kinesis Video Streams assigns a new version number. To get the latest stream version, use the DescribeStream API.  This operation requires permission for the KinesisVideo:DeleteStream action.
    @Sendable
    @inlinable
    public func deleteStream(_ input: DeleteStreamInput, logger: Logger = AWSClient.loggingDisabled) async throws -> DeleteStreamOutput {
        try await self.client.execute(
            operation: "DeleteStream", 
            path: "/deleteStream", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes a Kinesis video stream and the data contained in the stream.  This method marks the stream for deletion, and makes the data in the stream inaccessible immediately.  To ensure that you have the latest version of the stream before deleting it, you can specify the stream version. Kinesis Video Streams assigns a version to each stream. When you update a stream, Kinesis Video Streams assigns a new version number. To get the latest stream version, use the DescribeStream API.  This operation requires permission for the KinesisVideo:DeleteStream action.
    ///
    /// Parameters:
    ///   - currentVersion: Optional: The version of the stream that you want to delete.  Specify the version as a safeguard to ensure that your are deleting the correct stream. To get the stream version, use the DescribeStream API. If not specified, only the CreationTime is checked before deleting the stream.
    ///   - streamARN: The Amazon Resource Name (ARN) of the stream that you want to delete.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteStream(
        currentVersion: String? = nil,
        streamARN: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeleteStreamOutput {
        let input = DeleteStreamInput(
            currentVersion: currentVersion, 
            streamARN: streamARN
        )
        return try await self.deleteStream(input, logger: logger)
    }

    /// Describes a stream’s edge configuration that was set using the StartEdgeConfigurationUpdate API and the latest status of the edge agent's recorder and uploader jobs. Use this API to get the status of the configuration to determine if the configuration is in sync with the Edge Agent. Use this API to evaluate the health of the Edge Agent.
    @Sendable
    @inlinable
    public func describeEdgeConfiguration(_ input: DescribeEdgeConfigurationInput, logger: Logger = AWSClient.loggingDisabled) async throws -> DescribeEdgeConfigurationOutput {
        try await self.client.execute(
            operation: "DescribeEdgeConfiguration", 
            path: "/describeEdgeConfiguration", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Describes a stream’s edge configuration that was set using the StartEdgeConfigurationUpdate API and the latest status of the edge agent's recorder and uploader jobs. Use this API to get the status of the configuration to determine if the configuration is in sync with the Edge Agent. Use this API to evaluate the health of the Edge Agent.
    ///
    /// Parameters:
    ///   - streamARN: The Amazon Resource Name (ARN) of the stream. Specify either the StreamNameor the StreamARN.
    ///   - streamName: The name of the stream whose edge configuration you want to update. Specify either the StreamName or  the StreamARN.
    ///   - logger: Logger use during operation
    @inlinable
    public func describeEdgeConfiguration(
        streamARN: String? = nil,
        streamName: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DescribeEdgeConfigurationOutput {
        let input = DescribeEdgeConfigurationInput(
            streamARN: streamARN, 
            streamName: streamName
        )
        return try await self.describeEdgeConfiguration(input, logger: logger)
    }

    /// Gets the ImageGenerationConfiguration for a given Kinesis video stream.
    @Sendable
    @inlinable
    public func describeImageGenerationConfiguration(_ input: DescribeImageGenerationConfigurationInput, logger: Logger = AWSClient.loggingDisabled) async throws -> DescribeImageGenerationConfigurationOutput {
        try await self.client.execute(
            operation: "DescribeImageGenerationConfiguration", 
            path: "/describeImageGenerationConfiguration", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Gets the ImageGenerationConfiguration for a given Kinesis video stream.
    ///
    /// Parameters:
    ///   - streamARN: The Amazon Resource Name (ARN) of the Kinesis video stream from which to retrieve the image generation configuration. You must specify either the StreamName or the StreamARN.
    ///   - streamName: The name of the stream from which to retrieve the image generation configuration. You must specify either the StreamName or the StreamARN.
    ///   - logger: Logger use during operation
    @inlinable
    public func describeImageGenerationConfiguration(
        streamARN: String? = nil,
        streamName: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DescribeImageGenerationConfigurationOutput {
        let input = DescribeImageGenerationConfigurationInput(
            streamARN: streamARN, 
            streamName: streamName
        )
        return try await self.describeImageGenerationConfiguration(input, logger: logger)
    }

    /// Returns the most current information about the stream. The streamName or streamARN should be provided in the input.
    @Sendable
    @inlinable
    public func describeMappedResourceConfiguration(_ input: DescribeMappedResourceConfigurationInput, logger: Logger = AWSClient.loggingDisabled) async throws -> DescribeMappedResourceConfigurationOutput {
        try await self.client.execute(
            operation: "DescribeMappedResourceConfiguration", 
            path: "/describeMappedResourceConfiguration", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns the most current information about the stream. The streamName or streamARN should be provided in the input.
    ///
    /// Parameters:
    ///   - maxResults: The maximum number of results to return in the response.
    ///   - nextToken: The token to provide in your next request, to get another batch of results.
    ///   - streamARN: The Amazon Resource Name (ARN) of the stream.
    ///   - streamName: The name of the stream.
    ///   - logger: Logger use during operation
    @inlinable
    public func describeMappedResourceConfiguration(
        maxResults: Int? = nil,
        nextToken: String? = nil,
        streamARN: String? = nil,
        streamName: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DescribeMappedResourceConfigurationOutput {
        let input = DescribeMappedResourceConfigurationInput(
            maxResults: maxResults, 
            nextToken: nextToken, 
            streamARN: streamARN, 
            streamName: streamName
        )
        return try await self.describeMappedResourceConfiguration(input, logger: logger)
    }

    /// Returns the most current information about the channel. Specify the ChannelName or ChannelARN in the input.
    @Sendable
    @inlinable
    public func describeMediaStorageConfiguration(_ input: DescribeMediaStorageConfigurationInput, logger: Logger = AWSClient.loggingDisabled) async throws -> DescribeMediaStorageConfigurationOutput {
        try await self.client.execute(
            operation: "DescribeMediaStorageConfiguration", 
            path: "/describeMediaStorageConfiguration", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns the most current information about the channel. Specify the ChannelName or ChannelARN in the input.
    ///
    /// Parameters:
    ///   - channelARN: The Amazon Resource Name (ARN) of the channel.
    ///   - channelName: The name of the channel.
    ///   - logger: Logger use during operation
    @inlinable
    public func describeMediaStorageConfiguration(
        channelARN: String? = nil,
        channelName: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DescribeMediaStorageConfigurationOutput {
        let input = DescribeMediaStorageConfigurationInput(
            channelARN: channelARN, 
            channelName: channelName
        )
        return try await self.describeMediaStorageConfiguration(input, logger: logger)
    }

    /// Gets the NotificationConfiguration for a given Kinesis video stream.
    @Sendable
    @inlinable
    public func describeNotificationConfiguration(_ input: DescribeNotificationConfigurationInput, logger: Logger = AWSClient.loggingDisabled) async throws -> DescribeNotificationConfigurationOutput {
        try await self.client.execute(
            operation: "DescribeNotificationConfiguration", 
            path: "/describeNotificationConfiguration", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Gets the NotificationConfiguration for a given Kinesis video stream.
    ///
    /// Parameters:
    ///   - streamARN: The Amazon Resource Name (ARN) of the Kinesis video stream from where you want to retrieve the notification configuration. You must specify either the StreamName or the StreamARN.
    ///   - streamName: The name of the stream from which to retrieve the notification configuration. You must specify either the StreamName or the StreamARN.
    ///   - logger: Logger use during operation
    @inlinable
    public func describeNotificationConfiguration(
        streamARN: String? = nil,
        streamName: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DescribeNotificationConfigurationOutput {
        let input = DescribeNotificationConfigurationInput(
            streamARN: streamARN, 
            streamName: streamName
        )
        return try await self.describeNotificationConfiguration(input, logger: logger)
    }

    /// Returns the most current information about the signaling channel. You must specify either the name or the Amazon Resource Name (ARN) of the channel that you want to describe.
    @Sendable
    @inlinable
    public func describeSignalingChannel(_ input: DescribeSignalingChannelInput, logger: Logger = AWSClient.loggingDisabled) async throws -> DescribeSignalingChannelOutput {
        try await self.client.execute(
            operation: "DescribeSignalingChannel", 
            path: "/describeSignalingChannel", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns the most current information about the signaling channel. You must specify either the name or the Amazon Resource Name (ARN) of the channel that you want to describe.
    ///
    /// Parameters:
    ///   - channelARN: The ARN of the signaling channel that you want to describe.
    ///   - channelName: The name of the signaling channel that you want to describe.
    ///   - logger: Logger use during operation
    @inlinable
    public func describeSignalingChannel(
        channelARN: String? = nil,
        channelName: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DescribeSignalingChannelOutput {
        let input = DescribeSignalingChannelInput(
            channelARN: channelARN, 
            channelName: channelName
        )
        return try await self.describeSignalingChannel(input, logger: logger)
    }

    /// Returns the most current information about the specified stream. You must specify either the StreamName or the StreamARN.
    @Sendable
    @inlinable
    public func describeStream(_ input: DescribeStreamInput, logger: Logger = AWSClient.loggingDisabled) async throws -> DescribeStreamOutput {
        try await self.client.execute(
            operation: "DescribeStream", 
            path: "/describeStream", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns the most current information about the specified stream. You must specify either the StreamName or the StreamARN.
    ///
    /// Parameters:
    ///   - streamARN: The Amazon Resource Name (ARN) of the stream.
    ///   - streamName: The name of the stream.
    ///   - logger: Logger use during operation
    @inlinable
    public func describeStream(
        streamARN: String? = nil,
        streamName: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DescribeStreamOutput {
        let input = DescribeStreamInput(
            streamARN: streamARN, 
            streamName: streamName
        )
        return try await self.describeStream(input, logger: logger)
    }

    /// Gets an endpoint for a specified stream for either reading or writing. Use this endpoint in your application to read from the specified stream (using the GetMedia or GetMediaForFragmentList operations) or write to it (using the PutMedia operation).   The returned endpoint does not have the API name appended. The client needs to add the API name to the returned endpoint.  In the request, specify the stream either by StreamName or StreamARN.
    @Sendable
    @inlinable
    public func getDataEndpoint(_ input: GetDataEndpointInput, logger: Logger = AWSClient.loggingDisabled) async throws -> GetDataEndpointOutput {
        try await self.client.execute(
            operation: "GetDataEndpoint", 
            path: "/getDataEndpoint", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Gets an endpoint for a specified stream for either reading or writing. Use this endpoint in your application to read from the specified stream (using the GetMedia or GetMediaForFragmentList operations) or write to it (using the PutMedia operation).   The returned endpoint does not have the API name appended. The client needs to add the API name to the returned endpoint.  In the request, specify the stream either by StreamName or StreamARN.
    ///
    /// Parameters:
    ///   - apiName: The name of the API action for which to get an endpoint.
    ///   - streamARN: The Amazon Resource Name (ARN) of the stream that you want to get the endpoint for. You must specify either this parameter or a StreamName in the request.
    ///   - streamName: The name of the stream that you want to get the endpoint for. You must specify either this parameter or a StreamARN in the request.
    ///   - logger: Logger use during operation
    @inlinable
    public func getDataEndpoint(
        apiName: APIName,
        streamARN: String? = nil,
        streamName: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetDataEndpointOutput {
        let input = GetDataEndpointInput(
            apiName: apiName, 
            streamARN: streamARN, 
            streamName: streamName
        )
        return try await self.getDataEndpoint(input, logger: logger)
    }

    /// Provides an endpoint for the specified signaling channel to send and receive messages. This API uses the SingleMasterChannelEndpointConfiguration input parameter, which consists of the Protocols and Role properties.  Protocols is used to determine the communication mechanism. For example, if you specify WSS as the protocol, this API produces a secure websocket endpoint. If you specify HTTPS as the protocol, this API generates an HTTPS endpoint.   Role determines the messaging permissions. A MASTER role results in this API generating an endpoint that a client can use to communicate with any of the viewers on the channel. A VIEWER role results in this API generating an endpoint that a client can use to communicate only with a MASTER.
    @Sendable
    @inlinable
    public func getSignalingChannelEndpoint(_ input: GetSignalingChannelEndpointInput, logger: Logger = AWSClient.loggingDisabled) async throws -> GetSignalingChannelEndpointOutput {
        try await self.client.execute(
            operation: "GetSignalingChannelEndpoint", 
            path: "/getSignalingChannelEndpoint", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Provides an endpoint for the specified signaling channel to send and receive messages. This API uses the SingleMasterChannelEndpointConfiguration input parameter, which consists of the Protocols and Role properties.  Protocols is used to determine the communication mechanism. For example, if you specify WSS as the protocol, this API produces a secure websocket endpoint. If you specify HTTPS as the protocol, this API generates an HTTPS endpoint.   Role determines the messaging permissions. A MASTER role results in this API generating an endpoint that a client can use to communicate with any of the viewers on the channel. A VIEWER role results in this API generating an endpoint that a client can use to communicate only with a MASTER.
    ///
    /// Parameters:
    ///   - channelARN: The Amazon Resource Name (ARN) of the signalling channel for which you want to get an endpoint.
    ///   - singleMasterChannelEndpointConfiguration: A structure containing the endpoint configuration for the SINGLE_MASTER channel type.
    ///   - logger: Logger use during operation
    @inlinable
    public func getSignalingChannelEndpoint(
        channelARN: String,
        singleMasterChannelEndpointConfiguration: SingleMasterChannelEndpointConfiguration? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetSignalingChannelEndpointOutput {
        let input = GetSignalingChannelEndpointInput(
            channelARN: channelARN, 
            singleMasterChannelEndpointConfiguration: singleMasterChannelEndpointConfiguration
        )
        return try await self.getSignalingChannelEndpoint(input, logger: logger)
    }

    /// Returns an array of edge configurations associated with the specified Edge Agent. In the request, you must specify the Edge Agent HubDeviceArn.
    @Sendable
    @inlinable
    public func listEdgeAgentConfigurations(_ input: ListEdgeAgentConfigurationsInput, logger: Logger = AWSClient.loggingDisabled) async throws -> ListEdgeAgentConfigurationsOutput {
        try await self.client.execute(
            operation: "ListEdgeAgentConfigurations", 
            path: "/listEdgeAgentConfigurations", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns an array of edge configurations associated with the specified Edge Agent. In the request, you must specify the Edge Agent HubDeviceArn.
    ///
    /// Parameters:
    ///   - hubDeviceArn: The "Internet of Things (IoT) Thing" Arn of the edge agent.
    ///   - maxResults: The maximum number of edge configurations to return in the response. The default is 5.
    ///   - nextToken: If you specify this parameter, when the result of a ListEdgeAgentConfigurations operation is truncated, the call returns the NextToken in the response. To get another batch of edge configurations, provide this token in your next request.
    ///   - logger: Logger use during operation
    @inlinable
    public func listEdgeAgentConfigurations(
        hubDeviceArn: String,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListEdgeAgentConfigurationsOutput {
        let input = ListEdgeAgentConfigurationsInput(
            hubDeviceArn: hubDeviceArn, 
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.listEdgeAgentConfigurations(input, logger: logger)
    }

    /// Returns an array of ChannelInfo objects. Each object describes a signaling channel. To retrieve only those channels that satisfy a specific condition, you can specify a ChannelNameCondition.
    @Sendable
    @inlinable
    public func listSignalingChannels(_ input: ListSignalingChannelsInput, logger: Logger = AWSClient.loggingDisabled) async throws -> ListSignalingChannelsOutput {
        try await self.client.execute(
            operation: "ListSignalingChannels", 
            path: "/listSignalingChannels", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns an array of ChannelInfo objects. Each object describes a signaling channel. To retrieve only those channels that satisfy a specific condition, you can specify a ChannelNameCondition.
    ///
    /// Parameters:
    ///   - channelNameCondition: Optional: Returns only the channels that satisfy a specific condition.
    ///   - maxResults: The maximum number of channels to return in the response. The default is 500.
    ///   - nextToken: If you specify this parameter, when the result of a ListSignalingChannels operation is truncated, the call returns the NextToken in the response. To get another batch of channels, provide this token in your next request.
    ///   - logger: Logger use during operation
    @inlinable
    public func listSignalingChannels(
        channelNameCondition: ChannelNameCondition? = nil,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListSignalingChannelsOutput {
        let input = ListSignalingChannelsInput(
            channelNameCondition: channelNameCondition, 
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.listSignalingChannels(input, logger: logger)
    }

    /// Returns an array of StreamInfo objects. Each object describes a stream. To retrieve only streams that satisfy a specific condition, you can specify a StreamNameCondition.
    @Sendable
    @inlinable
    public func listStreams(_ input: ListStreamsInput, logger: Logger = AWSClient.loggingDisabled) async throws -> ListStreamsOutput {
        try await self.client.execute(
            operation: "ListStreams", 
            path: "/listStreams", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns an array of StreamInfo objects. Each object describes a stream. To retrieve only streams that satisfy a specific condition, you can specify a StreamNameCondition.
    ///
    /// Parameters:
    ///   - maxResults: The maximum number of streams to return in the response. The default is 10,000.
    ///   - nextToken: If you specify this parameter, when the result of a ListStreams operation is truncated, the call returns the NextToken in the response. To get another batch of streams, provide this token in your next request.
    ///   - streamNameCondition: Optional: Returns only streams that satisfy a specific condition. Currently, you can specify only the prefix of a stream name as a condition.
    ///   - logger: Logger use during operation
    @inlinable
    public func listStreams(
        maxResults: Int? = nil,
        nextToken: String? = nil,
        streamNameCondition: StreamNameCondition? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListStreamsOutput {
        let input = ListStreamsInput(
            maxResults: maxResults, 
            nextToken: nextToken, 
            streamNameCondition: streamNameCondition
        )
        return try await self.listStreams(input, logger: logger)
    }

    /// Returns a list of tags associated with the specified signaling channel.
    @Sendable
    @inlinable
    public func listTagsForResource(_ input: ListTagsForResourceInput, logger: Logger = AWSClient.loggingDisabled) async throws -> ListTagsForResourceOutput {
        try await self.client.execute(
            operation: "ListTagsForResource", 
            path: "/ListTagsForResource", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns a list of tags associated with the specified signaling channel.
    ///
    /// Parameters:
    ///   - nextToken: If you specify this parameter and the result of a ListTagsForResource call is truncated, the response includes a token that you can use in the next request to fetch the next batch of tags.
    ///   - resourceARN: The Amazon Resource Name (ARN) of the signaling channel for which you want to list tags.
    ///   - logger: Logger use during operation
    @inlinable
    public func listTagsForResource(
        nextToken: String? = nil,
        resourceARN: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListTagsForResourceOutput {
        let input = ListTagsForResourceInput(
            nextToken: nextToken, 
            resourceARN: resourceARN
        )
        return try await self.listTagsForResource(input, logger: logger)
    }

    /// Returns a list of tags associated with the specified stream. In the request, you must specify either the StreamName or the StreamARN.
    @Sendable
    @inlinable
    public func listTagsForStream(_ input: ListTagsForStreamInput, logger: Logger = AWSClient.loggingDisabled) async throws -> ListTagsForStreamOutput {
        try await self.client.execute(
            operation: "ListTagsForStream", 
            path: "/listTagsForStream", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns a list of tags associated with the specified stream. In the request, you must specify either the StreamName or the StreamARN.
    ///
    /// Parameters:
    ///   - nextToken: If you specify this parameter and the result of a ListTagsForStream call is truncated, the response includes a token that you can use in the next request to fetch the next batch of tags.
    ///   - streamARN: The Amazon Resource Name (ARN) of the stream that you want to list tags for.
    ///   - streamName: The name of the stream that you want to list tags for.
    ///   - logger: Logger use during operation
    @inlinable
    public func listTagsForStream(
        nextToken: String? = nil,
        streamARN: String? = nil,
        streamName: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListTagsForStreamOutput {
        let input = ListTagsForStreamInput(
            nextToken: nextToken, 
            streamARN: streamARN, 
            streamName: streamName
        )
        return try await self.listTagsForStream(input, logger: logger)
    }

    /// An asynchronous API that updates a stream’s existing edge configuration.  The Kinesis Video Stream will sync the stream’s edge configuration with the Edge Agent IoT Greengrass  component that runs on an IoT Hub Device, setup at your premise. The time to sync can vary and depends on the connectivity of the Hub Device.  The SyncStatus will be updated as the edge configuration is acknowledged,  and synced with the Edge Agent.  If this API is invoked for the first time, a new edge configuration will be created for the stream, and the sync status will be set to SYNCING. You will have to wait for the sync status to reach a terminal state such as: IN_SYNC, or SYNC_FAILED, before using this API again.  If you invoke this API during the syncing process, a ResourceInUseException will be thrown.  The connectivity of the stream’s edge configuration and the Edge Agent will be retried for 15 minutes. After 15 minutes, the status will transition into the SYNC_FAILED state. To move an edge configuration from one device to another, use DeleteEdgeConfiguration to delete the current edge configuration. You can then invoke StartEdgeConfigurationUpdate with an updated Hub Device ARN.
    @Sendable
    @inlinable
    public func startEdgeConfigurationUpdate(_ input: StartEdgeConfigurationUpdateInput, logger: Logger = AWSClient.loggingDisabled) async throws -> StartEdgeConfigurationUpdateOutput {
        try await self.client.execute(
            operation: "StartEdgeConfigurationUpdate", 
            path: "/startEdgeConfigurationUpdate", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// An asynchronous API that updates a stream’s existing edge configuration.  The Kinesis Video Stream will sync the stream’s edge configuration with the Edge Agent IoT Greengrass  component that runs on an IoT Hub Device, setup at your premise. The time to sync can vary and depends on the connectivity of the Hub Device.  The SyncStatus will be updated as the edge configuration is acknowledged,  and synced with the Edge Agent.  If this API is invoked for the first time, a new edge configuration will be created for the stream, and the sync status will be set to SYNCING. You will have to wait for the sync status to reach a terminal state such as: IN_SYNC, or SYNC_FAILED, before using this API again.  If you invoke this API during the syncing process, a ResourceInUseException will be thrown.  The connectivity of the stream’s edge configuration and the Edge Agent will be retried for 15 minutes. After 15 minutes, the status will transition into the SYNC_FAILED state. To move an edge configuration from one device to another, use DeleteEdgeConfiguration to delete the current edge configuration. You can then invoke StartEdgeConfigurationUpdate with an updated Hub Device ARN.
    ///
    /// Parameters:
    ///   - edgeConfig: The edge configuration details required to invoke the update process.
    ///   - streamARN:  The Amazon Resource Name (ARN) of the stream. Specify either the  StreamName or the StreamARN.
    ///   - streamName: The name of the stream whose edge configuration you want to update. Specify either the StreamName or the StreamARN.
    ///   - logger: Logger use during operation
    @inlinable
    public func startEdgeConfigurationUpdate(
        edgeConfig: EdgeConfig,
        streamARN: String? = nil,
        streamName: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> StartEdgeConfigurationUpdateOutput {
        let input = StartEdgeConfigurationUpdateInput(
            edgeConfig: edgeConfig, 
            streamARN: streamARN, 
            streamName: streamName
        )
        return try await self.startEdgeConfigurationUpdate(input, logger: logger)
    }

    /// Adds one or more tags to a signaling channel. A tag is a key-value pair (the value is optional) that you can define and assign to Amazon Web Services resources. If you specify a tag that already exists, the tag value is replaced with the value that you specify in the request. For more information, see Using Cost Allocation Tags in the Billing and Cost Management and Cost Management User Guide.
    @Sendable
    @inlinable
    public func tagResource(_ input: TagResourceInput, logger: Logger = AWSClient.loggingDisabled) async throws -> TagResourceOutput {
        try await self.client.execute(
            operation: "TagResource", 
            path: "/TagResource", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Adds one or more tags to a signaling channel. A tag is a key-value pair (the value is optional) that you can define and assign to Amazon Web Services resources. If you specify a tag that already exists, the tag value is replaced with the value that you specify in the request. For more information, see Using Cost Allocation Tags in the Billing and Cost Management and Cost Management User Guide.
    ///
    /// Parameters:
    ///   - resourceARN: The Amazon Resource Name (ARN) of the signaling channel to which you want to add tags.
    ///   - tags: A list of tags to associate with the specified signaling channel. Each tag is a key-value pair.
    ///   - logger: Logger use during operation
    @inlinable
    public func tagResource(
        resourceARN: String,
        tags: [Tag],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> TagResourceOutput {
        let input = TagResourceInput(
            resourceARN: resourceARN, 
            tags: tags
        )
        return try await self.tagResource(input, logger: logger)
    }

    /// Adds one or more tags to a stream. A tag is a key-value pair (the value is optional) that you can define and assign to Amazon Web Services resources. If you specify a tag that already exists, the tag value is replaced with the value that you specify in the request. For more information, see Using Cost Allocation Tags in the Billing and Cost Management and Cost Management User Guide.  You must provide either the StreamName or the StreamARN. This operation requires permission for the KinesisVideo:TagStream action. A Kinesis video stream can support up to 50 tags.
    @Sendable
    @inlinable
    public func tagStream(_ input: TagStreamInput, logger: Logger = AWSClient.loggingDisabled) async throws -> TagStreamOutput {
        try await self.client.execute(
            operation: "TagStream", 
            path: "/tagStream", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Adds one or more tags to a stream. A tag is a key-value pair (the value is optional) that you can define and assign to Amazon Web Services resources. If you specify a tag that already exists, the tag value is replaced with the value that you specify in the request. For more information, see Using Cost Allocation Tags in the Billing and Cost Management and Cost Management User Guide.  You must provide either the StreamName or the StreamARN. This operation requires permission for the KinesisVideo:TagStream action. A Kinesis video stream can support up to 50 tags.
    ///
    /// Parameters:
    ///   - streamARN: The Amazon Resource Name (ARN) of the resource that you want to add the tag or tags to.
    ///   - streamName: The name of the stream that you want to add the tag or tags to.
    ///   - tags: A list of tags to associate with the specified stream. Each tag is a key-value pair (the value is optional).
    ///   - logger: Logger use during operation
    @inlinable
    public func tagStream(
        streamARN: String? = nil,
        streamName: String? = nil,
        tags: [String: String],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> TagStreamOutput {
        let input = TagStreamInput(
            streamARN: streamARN, 
            streamName: streamName, 
            tags: tags
        )
        return try await self.tagStream(input, logger: logger)
    }

    /// Removes one or more tags from a signaling channel. In the request, specify only a tag key or keys; don't specify the value. If you specify a tag key that does not exist, it's ignored.
    @Sendable
    @inlinable
    public func untagResource(_ input: UntagResourceInput, logger: Logger = AWSClient.loggingDisabled) async throws -> UntagResourceOutput {
        try await self.client.execute(
            operation: "UntagResource", 
            path: "/UntagResource", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Removes one or more tags from a signaling channel. In the request, specify only a tag key or keys; don't specify the value. If you specify a tag key that does not exist, it's ignored.
    ///
    /// Parameters:
    ///   - resourceARN: The Amazon Resource Name (ARN) of the signaling channel from which you want to remove tags.
    ///   - tagKeyList: A list of the keys of the tags that you want to remove.
    ///   - logger: Logger use during operation
    @inlinable
    public func untagResource(
        resourceARN: String,
        tagKeyList: [String],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UntagResourceOutput {
        let input = UntagResourceInput(
            resourceARN: resourceARN, 
            tagKeyList: tagKeyList
        )
        return try await self.untagResource(input, logger: logger)
    }

    /// Removes one or more tags from a stream. In the request, specify only a tag key or keys; don't specify the value. If you specify a tag key that does not exist, it's ignored. In the request, you must provide the StreamName or StreamARN.
    @Sendable
    @inlinable
    public func untagStream(_ input: UntagStreamInput, logger: Logger = AWSClient.loggingDisabled) async throws -> UntagStreamOutput {
        try await self.client.execute(
            operation: "UntagStream", 
            path: "/untagStream", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Removes one or more tags from a stream. In the request, specify only a tag key or keys; don't specify the value. If you specify a tag key that does not exist, it's ignored. In the request, you must provide the StreamName or StreamARN.
    ///
    /// Parameters:
    ///   - streamARN: The Amazon Resource Name (ARN) of the stream that you want to remove tags from.
    ///   - streamName: The name of the stream that you want to remove tags from.
    ///   - tagKeyList: A list of the keys of the tags that you want to remove.
    ///   - logger: Logger use during operation
    @inlinable
    public func untagStream(
        streamARN: String? = nil,
        streamName: String? = nil,
        tagKeyList: [String],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UntagStreamOutput {
        let input = UntagStreamInput(
            streamARN: streamARN, 
            streamName: streamName, 
            tagKeyList: tagKeyList
        )
        return try await self.untagStream(input, logger: logger)
    }

    /// Increases or decreases the stream's data retention period by the value that you specify. To indicate whether you want to increase or decrease the data retention period, specify the Operation parameter in the request body. In the request, you must specify either the StreamName or the StreamARN.  This operation requires permission for the KinesisVideo:UpdateDataRetention action. Changing the data retention period affects the data in the stream as follows:   If the data retention period is increased, existing data is retained for the new retention period. For example, if the data retention period is increased from one hour to seven hours, all existing data is retained for seven hours.   If the data retention period is decreased, existing data is retained for the new retention period. For example, if the data retention period is decreased from seven hours to one hour, all existing data is retained for one hour, and any data older than one hour is deleted immediately.
    @Sendable
    @inlinable
    public func updateDataRetention(_ input: UpdateDataRetentionInput, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdateDataRetentionOutput {
        try await self.client.execute(
            operation: "UpdateDataRetention", 
            path: "/updateDataRetention", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Increases or decreases the stream's data retention period by the value that you specify. To indicate whether you want to increase or decrease the data retention period, specify the Operation parameter in the request body. In the request, you must specify either the StreamName or the StreamARN.  This operation requires permission for the KinesisVideo:UpdateDataRetention action. Changing the data retention period affects the data in the stream as follows:   If the data retention period is increased, existing data is retained for the new retention period. For example, if the data retention period is increased from one hour to seven hours, all existing data is retained for seven hours.   If the data retention period is decreased, existing data is retained for the new retention period. For example, if the data retention period is decreased from seven hours to one hour, all existing data is retained for one hour, and any data older than one hour is deleted immediately.
    ///
    /// Parameters:
    ///   - currentVersion: The version of the stream whose retention period you want to change. To get the version, call either the DescribeStream or the ListStreams API.
    ///   - dataRetentionChangeInHours: The number of hours to adjust the current retention by. The value you specify is added to or subtracted from the current value, depending on the operation. The minimum value for data retention is 0 and the maximum value is 87600 (ten years).
    ///   - operation: Indicates whether you want to increase or decrease the retention period.
    ///   - streamARN: The Amazon Resource Name (ARN) of the stream whose retention period you want to change.
    ///   - streamName: The name of the stream whose retention period you want to change.
    ///   - logger: Logger use during operation
    @inlinable
    public func updateDataRetention(
        currentVersion: String,
        dataRetentionChangeInHours: Int,
        operation: UpdateDataRetentionOperation,
        streamARN: String? = nil,
        streamName: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdateDataRetentionOutput {
        let input = UpdateDataRetentionInput(
            currentVersion: currentVersion, 
            dataRetentionChangeInHours: dataRetentionChangeInHours, 
            operation: operation, 
            streamARN: streamARN, 
            streamName: streamName
        )
        return try await self.updateDataRetention(input, logger: logger)
    }

    /// Updates the StreamInfo and ImageProcessingConfiguration fields.
    @Sendable
    @inlinable
    public func updateImageGenerationConfiguration(_ input: UpdateImageGenerationConfigurationInput, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdateImageGenerationConfigurationOutput {
        try await self.client.execute(
            operation: "UpdateImageGenerationConfiguration", 
            path: "/updateImageGenerationConfiguration", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Updates the StreamInfo and ImageProcessingConfiguration fields.
    ///
    /// Parameters:
    ///   - imageGenerationConfiguration: The structure that contains the information required for the KVS images delivery. If the structure is null, the configuration will be deleted from the stream.
    ///   - streamARN: The Amazon Resource Name (ARN) of the Kinesis video stream from where you want to update the image generation configuration. You must specify either the StreamName  or the StreamARN.
    ///   - streamName: The name of the stream from which to update the image generation configuration. You must specify either the StreamName or the StreamARN.
    ///   - logger: Logger use during operation
    @inlinable
    public func updateImageGenerationConfiguration(
        imageGenerationConfiguration: ImageGenerationConfiguration? = nil,
        streamARN: String? = nil,
        streamName: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdateImageGenerationConfigurationOutput {
        let input = UpdateImageGenerationConfigurationInput(
            imageGenerationConfiguration: imageGenerationConfiguration, 
            streamARN: streamARN, 
            streamName: streamName
        )
        return try await self.updateImageGenerationConfiguration(input, logger: logger)
    }

    /// Associates a SignalingChannel to a stream to store the media. There are two signaling modes that you can specify :   If StorageStatus is enabled, the data will be stored in the StreamARN provided. In order for WebRTC Ingestion to work, the stream must have data retention enabled.   If StorageStatus is disabled, no data will be stored, and the StreamARN parameter will not be needed.     If StorageStatus is enabled, direct peer-to-peer (master-viewer) connections no longer occur. Peers connect directly to the storage session. You must call the JoinStorageSession API to trigger an SDP offer send and establish a connection between a peer and the storage session.
    @Sendable
    @inlinable
    public func updateMediaStorageConfiguration(_ input: UpdateMediaStorageConfigurationInput, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdateMediaStorageConfigurationOutput {
        try await self.client.execute(
            operation: "UpdateMediaStorageConfiguration", 
            path: "/updateMediaStorageConfiguration", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Associates a SignalingChannel to a stream to store the media. There are two signaling modes that you can specify :   If StorageStatus is enabled, the data will be stored in the StreamARN provided. In order for WebRTC Ingestion to work, the stream must have data retention enabled.   If StorageStatus is disabled, no data will be stored, and the StreamARN parameter will not be needed.     If StorageStatus is enabled, direct peer-to-peer (master-viewer) connections no longer occur. Peers connect directly to the storage session. You must call the JoinStorageSession API to trigger an SDP offer send and establish a connection between a peer and the storage session.
    ///
    /// Parameters:
    ///   - channelARN: The Amazon Resource Name (ARN) of the channel.
    ///   - mediaStorageConfiguration: A structure that encapsulates, or contains, the media storage configuration properties.
    ///   - logger: Logger use during operation
    @inlinable
    public func updateMediaStorageConfiguration(
        channelARN: String,
        mediaStorageConfiguration: MediaStorageConfiguration,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdateMediaStorageConfigurationOutput {
        let input = UpdateMediaStorageConfigurationInput(
            channelARN: channelARN, 
            mediaStorageConfiguration: mediaStorageConfiguration
        )
        return try await self.updateMediaStorageConfiguration(input, logger: logger)
    }

    /// Updates the notification information for a stream.
    @Sendable
    @inlinable
    public func updateNotificationConfiguration(_ input: UpdateNotificationConfigurationInput, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdateNotificationConfigurationOutput {
        try await self.client.execute(
            operation: "UpdateNotificationConfiguration", 
            path: "/updateNotificationConfiguration", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Updates the notification information for a stream.
    ///
    /// Parameters:
    ///   - notificationConfiguration: The structure containing the information required for notifications. If the structure is null, the configuration will be deleted from the stream.
    ///   - streamARN: The Amazon Resource Name (ARN) of the Kinesis video stream from where you want to update the notification configuration. You must specify either the StreamName or the StreamARN.
    ///   - streamName: The name of the stream from which to update the notification configuration. You must specify either the StreamName or the StreamARN.
    ///   - logger: Logger use during operation
    @inlinable
    public func updateNotificationConfiguration(
        notificationConfiguration: NotificationConfiguration? = nil,
        streamARN: String? = nil,
        streamName: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdateNotificationConfigurationOutput {
        let input = UpdateNotificationConfigurationInput(
            notificationConfiguration: notificationConfiguration, 
            streamARN: streamARN, 
            streamName: streamName
        )
        return try await self.updateNotificationConfiguration(input, logger: logger)
    }

    /// Updates the existing signaling channel. This is an asynchronous operation and takes time to complete.  If the MessageTtlSeconds value is updated (either increased or reduced), it only applies to new messages sent via this channel after it's been updated. Existing messages are still expired as per the previous MessageTtlSeconds value.
    @Sendable
    @inlinable
    public func updateSignalingChannel(_ input: UpdateSignalingChannelInput, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdateSignalingChannelOutput {
        try await self.client.execute(
            operation: "UpdateSignalingChannel", 
            path: "/updateSignalingChannel", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Updates the existing signaling channel. This is an asynchronous operation and takes time to complete.  If the MessageTtlSeconds value is updated (either increased or reduced), it only applies to new messages sent via this channel after it's been updated. Existing messages are still expired as per the previous MessageTtlSeconds value.
    ///
    /// Parameters:
    ///   - channelARN: The Amazon Resource Name (ARN) of the signaling channel that you want to update.
    ///   - currentVersion: The current version of the signaling channel that you want to update.
    ///   - singleMasterConfiguration: The structure containing the configuration for the SINGLE_MASTER type of the signaling channel that you want to update.
    ///   - logger: Logger use during operation
    @inlinable
    public func updateSignalingChannel(
        channelARN: String,
        currentVersion: String,
        singleMasterConfiguration: SingleMasterConfiguration? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdateSignalingChannelOutput {
        let input = UpdateSignalingChannelInput(
            channelARN: channelARN, 
            currentVersion: currentVersion, 
            singleMasterConfiguration: singleMasterConfiguration
        )
        return try await self.updateSignalingChannel(input, logger: logger)
    }

    /// Updates stream metadata, such as the device name and media type. You must provide the stream name or the Amazon Resource Name (ARN) of the stream. To make sure that you have the latest version of the stream before updating it, you can specify the stream version. Kinesis Video Streams assigns a version to each stream. When you update a stream, Kinesis Video Streams assigns a new version number. To get the latest stream version, use the DescribeStream API.   UpdateStream is an asynchronous operation, and takes time to complete.
    @Sendable
    @inlinable
    public func updateStream(_ input: UpdateStreamInput, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdateStreamOutput {
        try await self.client.execute(
            operation: "UpdateStream", 
            path: "/updateStream", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Updates stream metadata, such as the device name and media type. You must provide the stream name or the Amazon Resource Name (ARN) of the stream. To make sure that you have the latest version of the stream before updating it, you can specify the stream version. Kinesis Video Streams assigns a version to each stream. When you update a stream, Kinesis Video Streams assigns a new version number. To get the latest stream version, use the DescribeStream API.   UpdateStream is an asynchronous operation, and takes time to complete.
    ///
    /// Parameters:
    ///   - currentVersion: The version of the stream whose metadata you want to update.
    ///   - deviceName: The name of the device that is writing to the stream.   In the current implementation, Kinesis Video Streams does not use this name.
    ///   - mediaType: The stream's media type. Use MediaType to specify the type of content that the stream contains to the consumers of the stream. For more information about media types, see Media Types. If you choose to specify the MediaType, see Naming Requirements. To play video on the console, you must specify the correct video type. For example, if the video in the stream is H.264, specify video/h264 as the MediaType.
    ///   - streamARN: The ARN of the stream whose metadata you want to update.
    ///   - streamName: The name of the stream whose metadata you want to update. The stream name is an identifier for the stream, and must be unique for each account and region.
    ///   - logger: Logger use during operation
    @inlinable
    public func updateStream(
        currentVersion: String,
        deviceName: String? = nil,
        mediaType: String? = nil,
        streamARN: String? = nil,
        streamName: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdateStreamOutput {
        let input = UpdateStreamInput(
            currentVersion: currentVersion, 
            deviceName: deviceName, 
            mediaType: mediaType, 
            streamARN: streamARN, 
            streamName: streamName
        )
        return try await self.updateStream(input, logger: logger)
    }
}

extension KinesisVideo {
    /// Initializer required by `AWSService.with(middlewares:timeout:byteBufferAllocator:options)`. You are not able to use this initializer directly as there are not public
    /// initializers for `AWSServiceConfig.Patch`. Please use `AWSService.with(middlewares:timeout:byteBufferAllocator:options)` instead.
    public init(from: KinesisVideo, patch: AWSServiceConfig.Patch) {
        self.client = from.client
        self.config = from.config.with(patch: patch)
    }
}

// MARK: Paginators

@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension KinesisVideo {
    /// Return PaginatorSequence for operation ``describeMappedResourceConfiguration(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func describeMappedResourceConfigurationPaginator(
        _ input: DescribeMappedResourceConfigurationInput,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<DescribeMappedResourceConfigurationInput, DescribeMappedResourceConfigurationOutput> {
        return .init(
            input: input,
            command: self.describeMappedResourceConfiguration,
            inputKey: \DescribeMappedResourceConfigurationInput.nextToken,
            outputKey: \DescribeMappedResourceConfigurationOutput.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``describeMappedResourceConfiguration(_:logger:)``.
    ///
    /// - Parameters:
    ///   - maxResults: The maximum number of results to return in the response.
    ///   - streamARN: The Amazon Resource Name (ARN) of the stream.
    ///   - streamName: The name of the stream.
    ///   - logger: Logger used for logging
    @inlinable
    public func describeMappedResourceConfigurationPaginator(
        maxResults: Int? = nil,
        streamARN: String? = nil,
        streamName: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<DescribeMappedResourceConfigurationInput, DescribeMappedResourceConfigurationOutput> {
        let input = DescribeMappedResourceConfigurationInput(
            maxResults: maxResults, 
            streamARN: streamARN, 
            streamName: streamName
        )
        return self.describeMappedResourceConfigurationPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listEdgeAgentConfigurations(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listEdgeAgentConfigurationsPaginator(
        _ input: ListEdgeAgentConfigurationsInput,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListEdgeAgentConfigurationsInput, ListEdgeAgentConfigurationsOutput> {
        return .init(
            input: input,
            command: self.listEdgeAgentConfigurations,
            inputKey: \ListEdgeAgentConfigurationsInput.nextToken,
            outputKey: \ListEdgeAgentConfigurationsOutput.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listEdgeAgentConfigurations(_:logger:)``.
    ///
    /// - Parameters:
    ///   - hubDeviceArn: The "Internet of Things (IoT) Thing" Arn of the edge agent.
    ///   - maxResults: The maximum number of edge configurations to return in the response. The default is 5.
    ///   - logger: Logger used for logging
    @inlinable
    public func listEdgeAgentConfigurationsPaginator(
        hubDeviceArn: String,
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListEdgeAgentConfigurationsInput, ListEdgeAgentConfigurationsOutput> {
        let input = ListEdgeAgentConfigurationsInput(
            hubDeviceArn: hubDeviceArn, 
            maxResults: maxResults
        )
        return self.listEdgeAgentConfigurationsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listSignalingChannels(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listSignalingChannelsPaginator(
        _ input: ListSignalingChannelsInput,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListSignalingChannelsInput, ListSignalingChannelsOutput> {
        return .init(
            input: input,
            command: self.listSignalingChannels,
            inputKey: \ListSignalingChannelsInput.nextToken,
            outputKey: \ListSignalingChannelsOutput.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listSignalingChannels(_:logger:)``.
    ///
    /// - Parameters:
    ///   - channelNameCondition: Optional: Returns only the channels that satisfy a specific condition.
    ///   - maxResults: The maximum number of channels to return in the response. The default is 500.
    ///   - logger: Logger used for logging
    @inlinable
    public func listSignalingChannelsPaginator(
        channelNameCondition: ChannelNameCondition? = nil,
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListSignalingChannelsInput, ListSignalingChannelsOutput> {
        let input = ListSignalingChannelsInput(
            channelNameCondition: channelNameCondition, 
            maxResults: maxResults
        )
        return self.listSignalingChannelsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listStreams(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listStreamsPaginator(
        _ input: ListStreamsInput,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListStreamsInput, ListStreamsOutput> {
        return .init(
            input: input,
            command: self.listStreams,
            inputKey: \ListStreamsInput.nextToken,
            outputKey: \ListStreamsOutput.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listStreams(_:logger:)``.
    ///
    /// - Parameters:
    ///   - maxResults: The maximum number of streams to return in the response. The default is 10,000.
    ///   - streamNameCondition: Optional: Returns only streams that satisfy a specific condition. Currently, you can specify only the prefix of a stream name as a condition.
    ///   - logger: Logger used for logging
    @inlinable
    public func listStreamsPaginator(
        maxResults: Int? = nil,
        streamNameCondition: StreamNameCondition? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListStreamsInput, ListStreamsOutput> {
        let input = ListStreamsInput(
            maxResults: maxResults, 
            streamNameCondition: streamNameCondition
        )
        return self.listStreamsPaginator(input, logger: logger)
    }
}

extension KinesisVideo.DescribeMappedResourceConfigurationInput: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> KinesisVideo.DescribeMappedResourceConfigurationInput {
        return .init(
            maxResults: self.maxResults,
            nextToken: token,
            streamARN: self.streamARN,
            streamName: self.streamName
        )
    }
}

extension KinesisVideo.ListEdgeAgentConfigurationsInput: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> KinesisVideo.ListEdgeAgentConfigurationsInput {
        return .init(
            hubDeviceArn: self.hubDeviceArn,
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}

extension KinesisVideo.ListSignalingChannelsInput: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> KinesisVideo.ListSignalingChannelsInput {
        return .init(
            channelNameCondition: self.channelNameCondition,
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}

extension KinesisVideo.ListStreamsInput: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> KinesisVideo.ListStreamsInput {
        return .init(
            maxResults: self.maxResults,
            nextToken: token,
            streamNameCondition: self.streamNameCondition
        )
    }
}
